package com.yan.domain;

public class MyDate {
    private int year;
    private int mouth;
    private int day;

    public MyDate(int year, int mouth, int day) {
        this.year = year;
        this.mouth = mouth;
        this.day = day;
    }

    public MyDate() {
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getMouth() {
        return mouth;
    }

    public void setMouth(int mouth) {
        this.mouth = mouth;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public void showDate(){
        System.out.println(year + "年" + mouth + "月" + day + "日");
    }

    public boolean isLeapYesr(){
        if(year % 100 != 0 && year % 4 == 0){
            return true;
        } else if(year % 400 == 0){
            return true;
        } else{
            return false;
        }
    }
}
